<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div >
    <h1>for 循环</h1>
    <table>
        <tr  th:each="demo,iterStat : ${demos}">
            <td th:text="${demo.code}">demo</td>
            <td th:text="${demo.name}">演示</td>
            <td th:text="${demo.age}">100</td>
            <td th:text="${iterStat.index}">index</td>
        </tr>
    </table>
</div>
</body>
</html>